package cn.tedu.lianxi6;

import java.util.Arrays;

public class Text2 {
	public static void main(String[] args) {
		n();
		na();
		nam();
	}
    public static void n() {
		char[] a= {'a','c','F','d','R','y'};
		String s=new String(a);
		String b=" a v cbf  ";
		System.out.println(s.charAt(3));
		System.out.println(s.concat("d k l"));
		System.out.println(s.endsWith("rf"));
		System.out.println(s.equals(s));
		System.out.println("---");
		System.out.println(s.hashCode());
		System.out.println(s.indexOf("a"));
		System.out.println(s.lastIndexOf("d"));
		System.out.println(s.isEmpty());
		System.out.println(s.length());
		System.out.println("------");
		System.out.println(s.replace("fd", "avb"));
		System.out.println(s.startsWith("c"));
		System.out.println(s.substring(3));
		System.out.println(s.substring(2, 4));
		System.out.println(s.toLowerCase());
		System.out.println(s.toUpperCase());
		System.out.println(b.trim());
		System.out.println("------");
		String c=String.valueOf(20);
		System.out.println(c+10);
		System.out.println(b.toCharArray());
		byte[] d=b.getBytes();
		System.out.println(Arrays.toString(d));
		String e="101213141516";
		String[] ss=e.split("1");
		System.out.println(Arrays.toString(ss));
		for (int i = 0; i < s.length(); i++) {
			System.out.print(s.charAt(i)+" ");
		}
		System.out.println();
		char[] a1=s.toCharArray();
		for (int i = 0; i < a1.length; i++) {
			System.out.print(a1[i]+" ");
		}
		System.out.println();
	}
    public static void na() {
		char[] a= {'a','v','g','D','F','u','l'};
		String s=new String(a);
		System.out.println(s.charAt(4));
		System.out.println(s.concat(" d jl"));
		System.out.println(s.endsWith("ul"));
		System.out.println(s.equals("jskajdji"));
		System.out.println("-----");
		System.out.println(s.hashCode());
		System.out.println(s.indexOf("g"));
		System.out.println(s.lastIndexOf("u"));
		System.out.println(s.isEmpty());
		System.out.println(s.length());
		System.out.println("--------");
		System.out.println(s.replace("vg", "dla"));
		System.out.println(s.startsWith("a"));
		System.out.println(s.substring(2));
		System.out.println(s.substring(4, 6));
		System.out.println(s.toLowerCase());
		System.out.println(s.toUpperCase());
		String b=" jdka lk kj kl";
		System.out.println(b.trim());
		System.out.println("------");
		String c=String.valueOf(20);
		System.out.println(c+20);
		System.out.println(b.toCharArray());
		byte[] d=b.getBytes();
		System.out.println(Arrays.toString(d));
		String e="1a1d12131d1f";
		String[] ss=e.split("1");
		System.out.println(Arrays.toString(ss));
		for (int i = 0; i < s.length(); i++) {
			System.out.print(s.charAt(i)+" ");
		}
		System.out.println();
		char[] a1=s.toCharArray();
		for (int i = 0; i < a1.length; i++) {
			System.out.print(a1[i]+" ");
		}
		System.out.println();
		
	}
    public static void nam() {
		
	}
}
